In a conventional network, there may be multiple paths to transport data packets between a source and a destination in the network. The network may be configured to split the traffic among these multiple paths. In a network that deploys Weighted Cost Multi Path (WCMP) routing, the traffic may be distributed among available paths based on a set of pre-determined routing ratios, i.e. costs. If the pre-determined ratios are equal, the routing is Equal Cost Multi Path (ECMP) routing, where the traffic is distributed evenly among the available paths.
Conventional datacenter deployments may employ multiple ECMP routing between various hosts. At each leg of the path between a source and destination pair, there may potentially exist multiple next hop neighbors with the same cost to the destination. In conventional networks, the forwarding link is selected based on hashing of various packet header information such as source IP address, destination IP address, protocol type, source port number, destination port number, etc. As a result, traffic from multiple applications on the same source-to-destination machines may traverse different paths.
Traceroute is a networking tool that helps to identify all the paths between a given source and destination pair. Traceroute also measures transit delays of packets on the identified paths. In a ECMP/WCMP network, a host may have to perform multiple traceroute operations if the host does not have knowledge of the ECMP/WCMP path distribution logic. The multiple traceroute operations may be performed by varying the source and/or the destination layer-4 port similar to performing a port-scan. Accordingly, in ECMP/WCMP networks, the traceroute operation must be run multiple times to identify all the potential paths that the traffic between various applications can take. An efficient mechanism for performing traceroute is required for ECMP/WCMP enabled paths.